package cn.outsourcing.supermarket.controller;

import cn.outsourcing.supermarket.common.Result;
import cn.outsourcing.supermarket.common.utils.ResultUtils;
import cn.outsourcing.supermarket.service.HiolabsSearchHistoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 前端控制器
 *
 * @author gzkemays
 * @since 2021-10-23
 */
@RestController
@RequestMapping("/search")
public class HiolabsSearchHistoryController {
  @Resource private HiolabsSearchHistoryService historyService;

  @GetMapping("/index")
  public Result getSearchIndex() {
    return ResultUtils.simpleResult(historyService.getSearchHistory());
  }
}
